package org.jeecg.modules.carInformationUpload.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.carInformationUpload.entity.CarInformationUpload;

/**
 * @Description: 进出厂车辆信息上传表
 * @Author: jeecg-boot
 * @Date:   2024-07-23
 * @Version: V1.0
 */
public interface CarInformationUploadMapper extends BaseMapper<CarInformationUpload> {

    @Select("SELECT COUNT(*) AS today_count FROM car_information_upload " +
            "WHERE upload_status = 1 AND create_time >= CURRENT_DATE AND create_time < CURRENT_DATE + INTERVAL 1 DAY;")
    int getTodayUploadCount();

    @Select("SELECT COUNT(*) AS today_count FROM car_information_upload " +
            "WHERE upload_status = 0 AND create_time >= CURRENT_DATE AND create_time < CURRENT_DATE + INTERVAL 1 DAY;")
    int getTodayUnUploadCount();

}
